package com.yingxin.yx.framework.commons.activiti;

public enum ApprovalStatus {

    PENDING_APPROVAL("0", "审核中"),

    APPROVED("1", "已通过"),

    COMPLETED("2", "已完结"),

    INVALIDING("3","作废中"),

    HANDLE("4","处理中"),

    CONDUCT("5","进行中"),

    BE_COMPLETED("6","已竣工"),

    TO_BE_CONFIRMED("7","待确认"),

    UPDATE("8","编辑申请中"),

    CANCEL_APPROVAL("9","取消预售审核中"),

    UNAPPROVED("-1", "已拒绝"),

    CANCEL("-2", "已撤销"),

    INVALID("-3", "已作废"),

    PENDING("-9", "未提交审核"),
    ;

    private String status;

    private String statusName;

    ApprovalStatus(String status, String statusName) {
        this.status = status;
        this.statusName = statusName;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public static ApprovalStatus getEnum(String status) {
        for (ApprovalStatus i : ApprovalStatus.values()) {
            if (i.getStatus().equals(status)) {
                return i;
            }
        }
        return null;
    }
}
